package org.wxd.account.api.user.dto;

import java.io.Serializable;

/**
 * Created by wangxd on 2015/10/30.
 */
public class UserRecord implements Serializable{

    private static final long serialVersionUID = 1772923140566656559L;

    private String userId;
    private long createTime;
    private long modifyTime;
    private boolean isLock;
    private String email;
    private UserMoreInfoRecord moreInfo;

    UserRecord(){}

    public UserRecord(Builder builder) {
        this.userId = builder.userId;
        this.createTime = builder.createTime;
        this.modifyTime = builder.modifyTime;
        this.isLock = builder.isLock;
        this.email = builder.email;
        this.moreInfo = builder.moreInfo;
    }

    public long createTime() {
        return createTime;
    }

    public long modifyTime() {
        return modifyTime;
    }

    public boolean isLock() {
        return isLock;
    }

    public String email() {
        return email;
    }

    public UserMoreInfoRecord moreInfo() {
        return moreInfo;
    }

    public String userId() {
        return userId;
    }


    public static Builder newBuilder(){
        return new Builder();
    }

    public static class Builder{
        String userId;
        long createTime;
        long modifyTime;
        boolean isLock;
        String email;
        UserMoreInfoRecord moreInfo;

        public Builder userId(String userId) {
            this.userId = userId;
            return this;
        }

        public Builder createTime(long createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder modifyTime(long modifyTime) {
            this.modifyTime = modifyTime;
            return this;
        }

        public Builder isLock(boolean isLock) {
            this.isLock = isLock;
            return this;
        }

        public Builder email(String email) {
            this.email = email;
            return this;
        }

        public Builder moreInfo(UserMoreInfoRecord moreInfo) {
            this.moreInfo = moreInfo;
            return this;
        }

        public UserRecord build(){
            return new UserRecord(this);
        }
    }
}
